﻿using Abp.Application.Navigation;
using Abp.Localization;
using LeadThing.AbpZeroTemplate.Areas;
using LeadThing.AbpZeroTemplate.Areas.Authorization;
using LeadThing.AbpZeroTemplate.ArticleCategorys.Authorization;
using LeadThing.AbpZeroTemplate.Articles.Authorization;
using LeadThing.AbpZeroTemplate.AssessmentReports.Authorization;
using LeadThing.AbpZeroTemplate.Authorization;
using LeadThing.AbpZeroTemplate.Authorization.Users.Dto;
using LeadThing.AbpZeroTemplate.BasicPersons.Authorization;
using LeadThing.AbpZeroTemplate.CallPolices.Authorization;
using LeadThing.AbpZeroTemplate.CallTypes.Authorization;
using LeadThing.AbpZeroTemplate.CameraManages.Authorization;
using LeadThing.AbpZeroTemplate.CaseCategorys.Authorization;
using LeadThing.AbpZeroTemplate.CommandDispatches.Authorization;
using LeadThing.AbpZeroTemplate.Common.Data;
using LeadThing.AbpZeroTemplate.DisputeInformations.Authorization;
using LeadThing.AbpZeroTemplate.DisputeTypes.Authorization;
using LeadThing.AbpZeroTemplate.Files.Authorization;
using LeadThing.AbpZeroTemplate.FireFightingWorks.Authorization;
using LeadThing.AbpZeroTemplate.GridPersons.Authorization;
using LeadThing.AbpZeroTemplate.LawsRegulationses.Authorization;
using LeadThing.AbpZeroTemplate.Notifications.Authorization;
using LeadThing.AbpZeroTemplate.PersonTypes;
using LeadThing.AbpZeroTemplate.PersonTypes.Authorization;
using LeadThing.AbpZeroTemplate.ProjectStatuss.Authorization;
using LeadThing.AbpZeroTemplate.SpecialPersons.Authorization;
using LeadThing.AbpZeroTemplate.SupportingSystems.Authorization;
using LeadThing.AbpZeroTemplate.UserMeetingRefs.Authorization;
using LeadThing.AbpZeroTemplate.VersionApps.Authorization;
using LeadThing.AbpZeroTemplate.VideoReceiverses.Authorization;
using LeadThing.AbpZeroTemplate.Web.Navigation;
using LeadThing.AbpZeroTemplate.WorkFlow_Processs.Authorization;
using LeadThing.AbpZeroTemplate.WorkFlow_Run_Processs.Authorization;
using LeadThing.AbpZeroTemplate.WorkFlow_Runs.Authorization;
using LeadThing.AbpZeroTemplate.WorkFlow_TableNames.Authorization;
using LeadThing.AbpZeroTemplate.WorkFlows.Authorization;
using System.Data;
using System.Linq;

namespace LeadThing.AbpZeroTemplate.Web.App.Startup
{
    /// <summary>
    /// This class defines menus for the application.
    /// It uses ABP's menu system.
    /// When you add menu items here, they are automatically appear in angular application.
    /// See .cshtml and .js files under App/Main/views/layout/header to know how to render menu.
    /// </summary>
    public class AppNavigationProvider : NavigationProvider
    {
        private readonly PersonTypeManage _personTypeManage;
        private readonly PersonTypeAppService _personTypeAppService;
        private readonly AreaAppService _areaAppService;
        private readonly ISqlExecuter _sqlExecuter;//sql语句接口

        public AppNavigationProvider(PersonTypeManage personTypeManage, PersonTypeAppService personTypeAppService, AreaAppService areaAppService, ISqlExecuter sqlExecuter)
        {
            _personTypeManage = personTypeManage;
            _personTypeAppService = personTypeAppService;
            _sqlExecuter = sqlExecuter;
            _areaAppService = areaAppService;
        }

        public override void SetNavigation(INavigationProviderContext context)
        {
            //DataTable dt = SqlServerHelper.ExecuteDataTable(" select * from dbo.AbpUsers ");

            #region 网格管理

            var gridManage = new MenuItemDefinition(
             GridPersonAppPermissions.GridPerson,
             L("Pages_GridManage"),
             icon: "icon-grid"
             );

            //网格划分
            gridManage.AddItem(
                new MenuItemDefinition(
                AreaAppPermissions.Area,
                L("Area"),
                "icon-star",
                url: "areas",
                requiredPermissionName: AreaAppPermissions.Area));

            //网格划分列表页
            gridManage.AddItem(
                new MenuItemDefinition(
                AreaAppPermissions.Area,
                L("AreaManager"),
                "icon-star",
                url: "areasList",
                requiredPermissionName: AreaAppPermissions.Area));

            //网格员队伍
            gridManage.AddItem(
            new MenuItemDefinition(
                        BasicPersonAppPermissions.GridPerson_Users,
                        L("Users"),
                        url: "users",
                        icon: "icon-star",
                        requiredPermissionName: BasicPersonAppPermissions.GridPerson_Users
                        ));

            //注册群众管理
            gridManage.AddItem(
            new MenuItemDefinition(
                        BasicPersonAppPermissions.RegisterPerson_Users,
                        L("Pages_Masses"),
                        url: "masses",
                        icon: "icon-star",
                        requiredPermissionName: BasicPersonAppPermissions.RegisterPerson_Users
                        ));

            //实有房屋、人口
            gridManage.AddItem(
                new MenuItemDefinition(
                BasicPersonAppPermissions.BasicPerson,
                L("BasicPerson"),
                "icon-star",
                url: "basicPersons",
                requiredPermissionName: BasicPersonAppPermissions.BasicPerson));

            //重点特殊人群
            var specialPerson = new MenuItemDefinition(
             GridPersonAppPermissions.GridPerson,
             L("SpecialPerson"),
             icon: "icon-grid"
             );

            //涉军类
            specialPerson.AddItem(
                new MenuItemDefinition(
                SpecialPersonAppPermissions.SpecialPerson,
                L("SheJun"),
                "icon-star",
                url: "sheJun",
                requiredPermissionName: SpecialPersonAppPermissions.SpecialPerson));

            //涉教类
            specialPerson.AddItem(
                new MenuItemDefinition(
                SpecialPersonAppPermissions.SpecialPerson,
                L("SheJiao"),
                "icon-star",
                url: "sheJiao",
                requiredPermissionName: SpecialPersonAppPermissions.SpecialPerson));

            //原计划生育临时工
            specialPerson.AddItem(
                new MenuItemDefinition(
                SpecialPersonAppPermissions.SpecialPerson,
                L("ShengYuLinShiGong"),
                "icon-star",
                url: "shengYuLinShiGong",
                requiredPermissionName: SpecialPersonAppPermissions.SpecialPerson));

            //刑满释放人员
            specialPerson.AddItem(
                new MenuItemDefinition(
                SpecialPersonAppPermissions.SpecialPerson,
                L("XingManShiFang"),
                "icon-star",
                url: "xingManShiFang",
                requiredPermissionName: SpecialPersonAppPermissions.SpecialPerson));

            //违法青少年
            specialPerson.AddItem(
                new MenuItemDefinition(
                SpecialPersonAppPermissions.SpecialPerson,
                L("WeiFaQingShaoNian"),
                "icon-star",
                url: "weiFaQingShaoNian",
                requiredPermissionName: SpecialPersonAppPermissions.SpecialPerson));

            //上访老人
            specialPerson.AddItem(
                new MenuItemDefinition(
                SpecialPersonAppPermissions.SpecialPerson,
                L("ShangFangLaoRen"),
                "icon-star",
                url: "shangFangLaoRen",
                requiredPermissionName: SpecialPersonAppPermissions.SpecialPerson));

            //吸毒人员
            specialPerson.AddItem(
                new MenuItemDefinition(
                SpecialPersonAppPermissions.SpecialPerson,
                L("XiDuRenYuan"),
                "icon-star",
                url: "xiDuRenYuan",
                requiredPermissionName: SpecialPersonAppPermissions.SpecialPerson));

            //肇事肇祸精神病人
            specialPerson.AddItem(
                new MenuItemDefinition(
                SpecialPersonAppPermissions.SpecialPerson,
                L("ZhaoShiZhaoHuo"),
                "icon-star",
                url: "zhaoShiZhaoHuo",
                requiredPermissionName: SpecialPersonAppPermissions.SpecialPerson));

            //社区矫正对象
            specialPerson.AddItem(
                new MenuItemDefinition(
                SpecialPersonAppPermissions.SpecialPerson,
                L("SheQuJiaoZheng"),
                "icon-star",
                url: "sheQuJiaoZheng",
                requiredPermissionName: SpecialPersonAppPermissions.SpecialPerson));

            //法轮功等邪教人员
            specialPerson.AddItem(
                new MenuItemDefinition(
                SpecialPersonAppPermissions.SpecialPerson,
                L("FaLunGong"),
                "icon-star",
                url: "faLunGong",
                requiredPermissionName: SpecialPersonAppPermissions.SpecialPerson));

            //低保
            specialPerson.AddItem(
                new MenuItemDefinition(
                SpecialPersonAppPermissions.SpecialPerson,
                L("DiBao"),
                "icon-star",
                url: "diBao",
                requiredPermissionName: SpecialPersonAppPermissions.SpecialPerson));


            #endregion

            #region 雪亮工程

            //雪亮工程
            var xueLiangGongCheng = new MenuItemDefinition(
             CallPoliceAppPermissions.XueLiangGongCheng,
             L("Pages_XueLiangGongCheng"),
             icon: "icon-grid"
             );

            //callPolice.AddItem(
            //    new MenuItemDefinition(
            //    CallPoliceAppPermissions.CallPolice,
            //    L("CallPolice"),
            //    "icon-star",
            //    url: "callPolices",
            //    requiredPermissionName: CallPoliceAppPermissions.CallPolice));

            //视频监控
            xueLiangGongCheng.AddItem(
             new MenuItemDefinition(
             CallPoliceAppPermissions.ShiPinJianKong,
             L("Pages_ShiPinJianKong"),
             url: "shiPinJianKong",
             icon: "icon-star",
             requiredPermissionName: CallPoliceAppPermissions.ShiPinJianKong
             ));

            //一键报警菜单
            var callPolice = new MenuItemDefinition(
            CallPoliceAppPermissions.CallPoliceManage,
            L("CallPoliceManage"),
            icon: "icon-grid"
            );

            //报警受理
            callPolice.AddItem(
                new MenuItemDefinition(
                CallPoliceAppPermissions.CallPoliceAcceptance,
                L("CallPoliceAcceptance"),
                "icon-star",
                url: "callPoliceAcceptance",
                requiredPermissionName: CallPoliceAppPermissions.CallPoliceAcceptance));

            callPolice.AddItem(
                new MenuItemDefinition(
                CallPoliceAppPermissions.JieAnGuiDang,
                L("JieAnGuiDang"),
                "icon-star",
                url: "callJieAnGuiDang",
                requiredPermissionName: CallPoliceAppPermissions.JieAnGuiDang));

            //视频播放
            //callPolice.AddItem(
            //    new MenuItemDefinition(
            //    CallPoliceAppPermissions.JieAnGuiDang,
            //    L("视频播放"),
            //    "icon-star",
            //    url: "video",
            //    requiredPermissionName: CallPoliceAppPermissions.JieAnGuiDang));

            //视频接访
            xueLiangGongCheng.AddItem(
                new MenuItemDefinition(
                VideoReceiversAppPermissions.VideoReceivers,
                L("VideoReceivers"),
                "icon-star",
                url: "videoReceiverses",
                requiredPermissionName: VideoReceiversAppPermissions.VideoReceivers));

            #endregion

            #region 矛盾纠纷

            var disputeInformationHandle = new MenuItemDefinition(
             DisputeInformationAppPermissions.DisputeInformation,
             L("MaoDunJiuFen"),
             icon: "icon-grid"
             );

            //矛盾纠纷受理
            disputeInformationHandle.AddItem(
                new MenuItemDefinition(
                DisputeInformationAppPermissions.DisputeInformation,
                L("MaoDunJiuFenAdd"),
                "icon-star",
                url: "disputeInformations",
                requiredPermissionName: DisputeInformationAppPermissions.DisputeInformation));

            //矛盾纠纷处理
            disputeInformationHandle.AddItem(
                new MenuItemDefinition(
                DisputeInformationAppPermissions.DisputeInformationHandle,
                L("DisputeInformationHandle"),
                "icon-star",
                url: "maoDunJiuFen",
                requiredPermissionName: DisputeInformationAppPermissions.DisputeInformationHandle));

            //调查调处
            disputeInformationHandle.AddItem(
                new MenuItemDefinition(
                DisputeInformationAppPermissions.DiaoChaDiaoChu,
                L("DiaoChaDiaoChu"),
                "icon-star",
                url: "diaoChaDiaoChu",
                requiredPermissionName: DisputeInformationAppPermissions.DiaoChaDiaoChu));

            //上传协议书
            disputeInformationHandle.AddItem(
                new MenuItemDefinition(
                DisputeInformationAppPermissions.Agreement,
                L("UploadAgreement"),
                "icon-star",
                url: "xieYiShu",
                requiredPermissionName: DisputeInformationAppPermissions.Agreement));

            //履行协议
            disputeInformationHandle.AddItem(
                new MenuItemDefinition(
                DisputeInformationAppPermissions.PerformanceAgreement,
                L("PerformanceAgreement"),
                "icon-star",
                url: "lvXingXieYi",
                requiredPermissionName: DisputeInformationAppPermissions.PerformanceAgreement));

            //结案归档
            disputeInformationHandle.AddItem(
                new MenuItemDefinition(
                DisputeInformationAppPermissions.DisputeInformationJieAnGuiDang,
                L("JieAnGuiDang"),
                "icon-star",
                url: "jieAnGuiDang",
                requiredPermissionName: DisputeInformationAppPermissions.DisputeInformationJieAnGuiDang));

            //需转交其他渠道解决
            disputeInformationHandle.AddItem(
                new MenuItemDefinition(
                DisputeInformationAppPermissions.OtherChannels,
                L("OtherChannels"),
                "icon-star",
                url: "qiTaQuDao",
                requiredPermissionName: DisputeInformationAppPermissions.OtherChannels));


            //跟踪督办
            disputeInformationHandle.AddItem(
                new MenuItemDefinition(
                DisputeInformationAppPermissions.GenZongDuBan,
                L("GenZongDuBan"),
                "icon-star",
                url: "genZongDuBan",
                requiredPermissionName: DisputeInformationAppPermissions.GenZongDuBan));

            //分析研判
            disputeInformationHandle.AddItem(
                new MenuItemDefinition(
                DisputeInformationAppPermissions.FenXiYanPan,
                L("FenXiYanPan"),
                "icon-star",
                url: "fenXiYanPan",
                requiredPermissionName: DisputeInformationAppPermissions.FenXiYanPan));

            #endregion

            #region 社会稳定风险评估


            var supportingSystem = new MenuItemDefinition(
                SupportingSystemAppPermissions.SupportingSystem,
                L("Pages_RiskAssessment"),
                icon: "icon-grid"
                );

            supportingSystem.AddItem(
                new MenuItemDefinition(
                SupportingSystemAppPermissions.SupportingSystem,
                L("SupportingSystem"),
                "icon-star",
                url: "supportingSystems",
                requiredPermissionName: SupportingSystemAppPermissions.SupportingSystem));

            supportingSystem.AddItem(
                new MenuItemDefinition(
                AssessmentReportAppPermissions.AssessmentReport,
                L("AssessmentReport"),
                "icon-star",
                url: "assessmentReports",
                requiredPermissionName: AssessmentReportAppPermissions.AssessmentReport));

            supportingSystem.AddItem(
                new MenuItemDefinition(
                ProjectStatusAppPermissions.ProjectStatus,
                L("ProjectStatus"),
                "icon-star",
                url: "projectStatuss",
                requiredPermissionName: ProjectStatusAppPermissions.ProjectStatus));


            #endregion

            #region 指挥调度

            var commandDispatch = new MenuItemDefinition(
                CommandDispatchAppPermissions.CommandDispatch,
                L("CommandDispatch"),
                url: "commandDispatches",
                icon: "icon-grid",
                requiredPermissionName: CommandDispatchAppPermissions.CommandDispatch
                );

            #endregion

            #region 法律法规

            var lawsRegulations = new MenuItemDefinition(
                 LawsRegulationsAppPermissions.LawsRegulations,
                 L("LawsRegulations"),
                 icon: "icon-grid"
                 );

            lawsRegulations.AddItem(
                new MenuItemDefinition(
                LawsRegulationsAppPermissions.LawsRegulations,
                L("LawsRegulations"),
                "icon-star",
                url: "lawsRegulationss",
                requiredPermissionName: LawsRegulationsAppPermissions.LawsRegulations));

            #endregion

            #region 消息通知

            var notifications = new MenuItemDefinition(
                 NotificationAppPermissions.Notification,
                 L("Pages_Notification"),
                 icon: "icon-grid"
                 );

            notifications.AddItem(
                new MenuItemDefinition(
                NotificationAppPermissions.Notification,
                L("NotificationRelease"),
                "icon-star",
                url: "notificationManage",
                requiredPermissionName: NotificationAppPermissions.Notification));

            notifications.AddItem(
                new MenuItemDefinition(
                NotificationAppPermissions.Notification,
                L("NotificationReceive"),
                "icon-star",
                url: "notifications",
                requiredPermissionName: NotificationAppPermissions.Notification));

            #endregion

            #region 网格管理基本信息

            var gridPerson = new MenuItemDefinition(
             GridPersonAppPermissions.GridPerson,
             L("Pages_GridData"),
             icon: "icon-grid"
             );

            //网格基本信息
            gridPerson.AddItem(
                new MenuItemDefinition(
                GridPersonAppPermissions.GridPerson,
                L("GridPerson"),
                "icon-star",
                url: "gridPersons",
                requiredPermissionName: GridPersonAppPermissions.GridPerson));

            //人员类别
            gridPerson.AddItem(
                new MenuItemDefinition(
                PersonTypeAppPermissions.PersonType,
                L("PersonType"),
                "icon-star",
                url: "personTypes",
                requiredPermissionName: PersonTypeAppPermissions.PersonType));

            //纠纷类别
            gridPerson.AddItem(
                new MenuItemDefinition(
                DisputeTypeAppPermissions.DisputeType,
                L("DisputeType"),
                "icon-star",
                url: "disputeTypes",
                requiredPermissionName: DisputeTypeAppPermissions.DisputeType));

            //一键报警类别
            gridPerson.AddItem(
                new MenuItemDefinition(
                CallTypeAppPermissions.CallType,
                L("CallType"),
                "icon-star",
                url: "callTypes",
                requiredPermissionName: CallTypeAppPermissions.CallType));

            #endregion

            #region 矛盾纠纷案例


            var caseCategory = new MenuItemDefinition(
             CaseCategoryAppPermissions.CaseCategory,
             L("Pages_CaseCategory"),
             icon: "icon-grid"
             );

            caseCategory.AddItem(
                new MenuItemDefinition(
                CaseCategoryAppPermissions.CaseCategory,
                L("CaseCategory"),
                "icon-star",
                url: "caseCategorys",
                requiredPermissionName: CaseCategoryAppPermissions.CaseCategory));


            #endregion

            #region 文章管理

            var articleCategory = new MenuItemDefinition(
                ArticleCategoryAppPermissions.ArticleCategory,
                L("Pages_ArticleManage"),
                icon: "icon-grid"
                );

            //文章分类
            articleCategory.AddItem(
                new MenuItemDefinition(
                ArticleCategoryAppPermissions.ArticleCategory,
                L("ArticleCategory"),
                "icon-star",
                url: "articleCategorys",
                requiredPermissionName: ArticleCategoryAppPermissions.ArticleCategory));

            articleCategory.AddItem(
                new MenuItemDefinition(
                ArticleAppPermissions.Article,
                L("Article"),
                "icon-star",
                url: "articles",
                requiredPermissionName: ArticleAppPermissions.Article));

            #endregion

            #region 摄像机管理

            var cameraManage = new MenuItemDefinition(
                CameraManageAppPermissions.CameraManage,
                L("CameraManage"),
                url: "cameraManages",
                icon: "icon-grid",
                requiredPermissionName: CameraManageAppPermissions.CameraManage
                );

            #endregion

            #region 视频会议管理

            var userMeetingRef = new MenuItemDefinition(
                UserMeetingRefAppPermissions.UserMeetingRef,
                L("UserMeetingRef"),
                url: "userMeetingRefs",
                icon: "icon-grid",
                requiredPermissionName: UserMeetingRefAppPermissions.UserMeetingRef
                );

            #endregion

            #region 工作流

            var workFlow = new MenuItemDefinition(
             WorkFlowAppPermissions.WorkFlow,
             L("Pages_WorkFlow"),
             icon: "icon-grid"
             );

            workFlow.AddItem(
                new MenuItemDefinition(
                WorkFlowAppPermissions.WorkFlow,
                L("WorkFlow"),
                "icon-star",
                url: "workFlows",
                requiredPermissionName: WorkFlowAppPermissions.WorkFlow));

            workFlow.AddItem(
                new MenuItemDefinition(
                WorkFlow_ProcessAppPermissions.WorkFlow_Process,
                L("WorkFlow_Process"),
                "icon-star",
                url: "workFlow_Processs",
                requiredPermissionName: WorkFlow_ProcessAppPermissions.WorkFlow_Process));

            workFlow.AddItem(
                new MenuItemDefinition(
                WorkFlow_TableNameAppPermissions.WorkFlow_TableName,
                L("WorkFlow_TableName"),
                "icon-star",
                url: "workFlow_TableNames",
                requiredPermissionName: WorkFlow_TableNameAppPermissions.WorkFlow_TableName));

            #endregion

            #region APP版本管理

            var versionApp = new MenuItemDefinition(
                VersionAppAppPermissions.VersionApp,
                L("VersionApp"),
                url: "versionApps",
                icon: "icon-grid",
                requiredPermissionName: VersionAppAppPermissions.VersionApp
                );

            #endregion

            #region 消防工作

            var fireFightingWork = new MenuItemDefinition(
                FireFightingWorkAppPermissions.FireFightingWork,
                L("FireFightingWork"),
                url: "fireFightingWorks",
                icon: "icon-grid",
                requiredPermissionName: FireFightingWorkAppPermissions.FireFightingWork
                );

            #endregion


            context.Manager.MainMenu
                .AddItem(new MenuItemDefinition(
                    PageNames.App.Host.Tenants,
                    L("Tenants"),
                    url: "host.tenants",
                    icon: "icon-globe",
                    requiredPermissionName: AppPermissions.Pages_Tenants
                    )
                ).AddItem(new MenuItemDefinition(
                    PageNames.App.Host.Editions,
                    L("Editions"),
                    url: "host.editions",
                    icon: "icon-grid",
                    requiredPermissionName: AppPermissions.Pages_Editions
                    )
                ).AddItem(new MenuItemDefinition(
                    PageNames.App.Tenant.Dashboard,
                    L("Dashboard"),
                    url: "tenant.dashboard",
                    icon: "icon-home",
                    requiredPermissionName: AppPermissions.Pages_Tenant_Dashboard
                    )
                ).AddItem(new MenuItemDefinition(
                    PageNames.App.Common.Administration,
                    L("Administration"),
                    icon: "icon-wrench"
                    ).AddItem(new MenuItemDefinition(
                        PageNames.App.Common.OrganizationUnits,
                        L("OrganizationUnits"),
                        url: "organizationUnits",
                        icon: "icon-layers",
                        requiredPermissionName: AppPermissions.Pages_Administration_OrganizationUnits
                        )
                    ).AddItem(new MenuItemDefinition(
                        PageNames.App.Common.Roles,
                        L("Roles"),
                        url: "roles",
                        icon: "icon-briefcase",
                        requiredPermissionName: AppPermissions.Pages_Administration_Roles
                        )
                    ).AddItem(new MenuItemDefinition(
                        PageNames.App.Common.Languages,
                        L("Languages"),
                        url: "languages",
                        icon: "icon-flag",
                        requiredPermissionName: AppPermissions.Pages_Administration_Languages
                        )
                    ).AddItem(new MenuItemDefinition(
                        PageNames.App.Common.AuditLogs,
                        L("AuditLogs"),
                        url: "auditLogs",
                        icon: "icon-lock",
                        requiredPermissionName: AppPermissions.Pages_Administration_AuditLogs
                        )
                    ).AddItem(new MenuItemDefinition(
                        PageNames.App.Host.Maintenance,
                        L("Maintenance"),
                        url: "host.maintenance",
                        icon: "icon-wrench",
                        requiredPermissionName: AppPermissions.Pages_Administration_Host_Maintenance
                        )
                    )
                    .AddItem(new MenuItemDefinition(
                        PageNames.App.Host.Settings,
                        L("Settings"),
                        url: "host.settings",
                        icon: "icon-settings",
                        requiredPermissionName: AppPermissions.Pages_Administration_Host_Settings
                        )
                    ).AddItem(new MenuItemDefinition(
                        PageNames.App.Tenant.Settings,
                        L("Settings"),
                        url: "tenant.settings",
                        icon: "icon-settings",
                        requiredPermissionName: AppPermissions.Pages_Administration_Tenant_Settings
                        )
                    )
                ).AddItem(gridManage.AddItem(specialPerson)
                ).AddItem(xueLiangGongCheng.AddItem(callPolice)
                ).AddItem(disputeInformationHandle
                ).AddItem(supportingSystem
                ).AddItem(lawsRegulations
                ).AddItem(notifications
                ).AddItem(commandDispatch
                ).AddItem(gridPerson
                ).AddItem(caseCategory
                ).AddItem(articleCategory
                ).AddItem(cameraManage
                ).AddItem(userMeetingRef
                ).AddItem(workFlow
                ).AddItem(versionApp
                ).AddItem(fireFightingWork
                );
        }

        private static ILocalizableString L(string name)
        {
            return new LocalizableString(name, AbpZeroTemplateConsts.LocalizationSourceName);
        }
    }
}
